home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / stackdis < prev    next >
Internet Message Format  |  1995-03-31  |  3KB

  1. From Jake-S@cup.portal.com Mon Apr 30 18:59:05 1990
  2. From: Jake-S@cup.portal.com (Jake G Schwartz)
  3. Newsgroups: comp.sys.handhelds
  4. Subject: HP48 6-Level Stack Display
  5. Date: 28 Apr 90 01:05:08 GMT
  6. Organization: The Portal System (TM)
  7.  
  8.  
  9.      An HP48 Six-Level Stack Display Using Vectored Enter
  10.     ------------------------------------------------------
  11.  
  12.      The HP48SX vectored ENTER capability is useful when modifications
  13. must be done immediately before or after a command line is processed.
  14. Previous examples mentioned on Usenet include (1) the automatic conversion
  15. of real numbers to binary integers (using <alpha>ENTER to add the # symbol
  16. in front) and (2) simulating the TRACE mode for the HP82240 printer (by
  17. having <beta>ENTER perform a PR1 or PRSTK after each keystroke which per-
  18. forms an automatic ENTER).
  19.      Here is a use for <beta>ENTER which overwrites the display status 
  20. area with the values of stack levels 5 and 6 following each parsing of the 
  21. command line.  (Having stack level one multi-line mode turned OFF guarantees
  22. that all six levels will always be displayed.)  Enter the program below
  23. and store it as <beta>ENTER (where <beta> is the right shifted B) in the
  24. HOME directory; set flags -62 (USER mode) and -63; and at the end of each
  25. keystroke which parses the command line the program will automatically
  26. display the values of stack levels 5 and 6.
  27.  
  28.                                           Jake Schwartz
  29.                                           135 Saxby Terr
  30.                                           Cherry Hill NJ 08003
  31.                                           609-751-1310   home
  32.                                           609-866-6268   work
  33.  
  34.  
  35. <beta>ENTER:
  36. ------------
  37.  
  38. %%HP: T(3)A(D)F(.);
  39. \<< DROP                   @ drops the command line converted to string
  40. "6:                   "    @ initial 21-character string for line 6
  41.   IF DEPTH 7 \>=           @ if stack level 6 exists
  42.   THEN 7 PICK \->STR       @    get it and convert to a string
  43.   ELSE ""                  @    otherwise use a null string
  44.   END 23 OVER SIZE         @ get size of object string
  45. - 3 MAX SWAP REPL 1        @ position it right-justified in display string
  46. DISP                       @ display in line one of LCD
  47. "5:                   "    @ -- repeat
  48.   IF DEPTH 6 \>=           @    the same
  49.   THEN 6 PICK \->STR       @    process
  50.   ELSE ""                  @    for
  51.   END 23 OVER SIZE         @    stack
  52. - 3 MAX SWAP REPL 2        @    level 5 --
  53. DISP 1 FREEZE              @ and freeze the status area of the LCD
  54. \>>
  55.  
  56.